



<!doctype html>
<html lang="en" class="no-js">
  <head>
    
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width,initial-scale=1">
      <meta http-equiv="x-ua-compatible" content="ie=edge">
      
        <meta name="description" content="Here you can find all documents about QTrobot.">
      
      
        <link rel="canonical" href="https://luxai-qtrobot.github.io/demos/qt_emotion_game/">
      
      
        <meta name="author" content="QTrobot">
      
      
        <meta name="lang:clipboard.copy" content="Copy to clipboard">
      
        <meta name="lang:clipboard.copied" content="Copied to clipboard">
      
        <meta name="lang:search.language" content="en">
      
        <meta name="lang:search.pipeline.stopwords" content="True">
      
        <meta name="lang:search.pipeline.trimmer" content="True">
      
        <meta name="lang:search.result.none" content="No matching documents">
      
        <meta name="lang:search.result.one" content="1 matching document">
      
        <meta name="lang:search.result.other" content="# matching documents">
      
        <meta name="lang:search.tokenizer" content="[\s\-]+">
      
      <link rel="shortcut icon" href="../../img/luxai-favicon.ico">
      <meta name="generator" content="mkdocs-1.1, mkdocs-material-4.6.3">
    
    
      
        <title>**Emotion Game Demo** - QTrobot Documentation</title>
      
    
    
      <link rel="stylesheet" href="../../assets/stylesheets/application.adb8469c.css">
      
        <link rel="stylesheet" href="../../assets/stylesheets/application-palette.a8b3c06d.css">
      
      
        
        
        <meta name="theme-color" content="#3f51b5">
      
    
    
      <script src="../../assets/javascripts/modernizr.86422ebf.js"></script>
    
    
      
        <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
        <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
        <style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
      
    
    <link rel="stylesheet" href="../../assets/fonts/material-icons.css">
    
    
      <link rel="stylesheet" href="../../stylesheets/extra.css">
    
    
      
    
    
  </head>
  
    
    
    <body dir="ltr" data-md-color-primary="indigo" data-md-color-accent="indigo">
  
    <svg class="md-svg">
      <defs>
        
        
      </defs>
    </svg>
    <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
    <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
    <label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
    
      <a href="#emotion-game-demo" tabindex="0" class="md-skip">
        Skip to content
      </a>
    
    
      <header class="md-header" data-md-component="header">
  <nav class="md-header-nav md-grid">
    <div class="md-flex">
      <div class="md-flex__cell md-flex__cell--shrink">
        <a href="https://luxai-qtrobot.github.io/" title="QTrobot Documentation" aria-label="QTrobot Documentation" class="md-header-nav__button md-logo">
          
            <img alt="logo" src="../../img/logo_luxai_white.png" width="24" height="24">
          
        </a>
      </div>
      <div class="md-flex__cell md-flex__cell--shrink">
        <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
      </div>
      <div class="md-flex__cell md-flex__cell--stretch">
        <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
          
            <span class="md-header-nav__topic">
              QTrobot Documentation
            </span>
            <span class="md-header-nav__topic">
              
                **Emotion Game Demo**
              
            </span>
          
        </div>
      </div>
      <div class="md-flex__cell md-flex__cell--shrink">
        
          <label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
          
<div class="md-search" data-md-component="search" role="dialog">
  <label class="md-search__overlay" for="__search"></label>
  <div class="md-search__inner" role="search">
    <form class="md-search__form" name="search">
      <input type="text" class="md-search__input" aria-label="search" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
      <label class="md-icon md-search__icon" for="__search"></label>
      <button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
        &#xE5CD;
      </button>
    </form>
    <div class="md-search__output">
      <div class="md-search__scrollwrap" data-md-scrollfix>
        <div class="md-search-result" data-md-component="result">
          <div class="md-search-result__meta">
            Type to start searching
          </div>
          <ol class="md-search-result__list"></ol>
        </div>
      </div>
    </div>
  </div>
</div>
        
      </div>
      
    </div>
  </nav>
</header>
    
    <div class="md-container">
      
        
      
      
      <main class="md-main" role="main">
        <div class="md-main__inner md-grid" data-md-component="container">
          
            
              <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    <nav class="md-nav md-nav--primary" data-md-level="0">
  <label class="md-nav__title md-nav__title--site" for="__drawer">
    <a href="https://luxai-qtrobot.github.io/" title="QTrobot Documentation" class="md-nav__button md-logo">
      
        <img alt="logo" src="../../img/logo_luxai_white.png" width="48" height="48">
      
    </a>
    QTrobot Documentation
  </label>
  
  <ul class="md-nav__list" data-md-scrollfix>
    
      
      
      


  <li class="md-nav__item">
    <a href="../.." title="Home" class="md-nav__link">
      Home
    </a>
  </li>

    
      
      
      


  <li class="md-nav__item">
    <a href="../../user-manual/" title="Quick Start" class="md-nav__link">
      Quick Start
    </a>
  </li>

    
      
      
      


  <li class="md-nav__item">
    <a href="../../api/" title="API Reference" class="md-nav__link">
      API Reference
    </a>
  </li>

    
      
      
      


  <li class="md-nav__item md-nav__item--nested">
    
      <input class="md-toggle md-nav__toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4">
    
    <label class="md-nav__link" for="nav-4">
      FAQ
    </label>
    <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
      <label class="md-nav__title" for="nav-4">
        FAQ
      </label>
      <ul class="md-nav__list" data-md-scrollfix>
        
        
          
          
          


  <li class="md-nav__item">
    <a href="../../FAQ/Audio/" title="Audio" class="md-nav__link">
      Audio
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../FAQ/Autostart/" title="Autostart" class="md-nav__link">
      Autostart
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../FAQ/Motors/" title="Motors" class="md-nav__link">
      Motors
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../FAQ/Network/" title="Network" class="md-nav__link">
      Network
    </a>
  </li>

        
          
          
          


  <li class="md-nav__item">
    <a href="../../FAQ/Miscellaneous/" title="Miscellaneous" class="md-nav__link">
      Miscellaneous
    </a>
  </li>

        
      </ul>
    </nav>
  </li>

    
      
      
      


  <li class="md-nav__item">
    <a href="../" title="Demos" class="md-nav__link">
      Demos
    </a>
  </li>

    
      
      
      


  <li class="md-nav__item">
    <a href="../../examples/" title="Examples" class="md-nav__link">
      Examples
    </a>
  </li>

    
      
      
      


  <li class="md-nav__item">
    <a href="../../author-note/" title="Author's Note" class="md-nav__link">
      Author's Note
    </a>
  </li>

    
  </ul>
</nav>
                  </div>
                </div>
              </div>
            
            
              <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
                <div class="md-sidebar__scrollwrap">
                  <div class="md-sidebar__inner">
                    
<nav class="md-nav md-nav--secondary">
  
  
    
  
  
    <label class="md-nav__title" for="__toc">Table of contents</label>
    <ul class="md-nav__list" data-md-scrollfix>
      
        <li class="md-nav__item">
  <a href="#video" class="md-nav__link">
    Video
  </a>
  
</li>
      
        <li class="md-nav__item">
  <a href="#code" class="md-nav__link">
    Code
  </a>
  
</li>
      
      
      
      
      
    </ul>
  
</nav>
                  </div>
                </div>
              </div>
            
          
          <div class="md-content">
            <article class="md-content__inner md-typeset">
              
                
                
                <h1 id="emotion-game-demo"><strong>Emotion Game Demo</strong></h1>
<div class="admonition question">
<p class="admonition-title">About</p>
<p>This is face recognition, age and gender demo with <a href="http://luxai.com/qtrobot-for-research/#hardware">QTrobot.</a>
Check the video for demonstration. Full code for this demo you can find in our <a href="https://github.com/luxai-qtrobot/tutorials/tree/master/demos/qt_emotion_game">github tutorial repository.</a></p>
</div>
<h2 id="video"><strong>Video</strong></h2>
<p><a href="http://www.youtube.com/watch?v=5LfVuUbQfqg" title="Image Recognition - Emotion Game Demo"><img alt="Emotion Game Demo" src="http://img.youtube.com/vi/5LfVuUbQfqg/0.jpg" /></a></p>
<h2 id="code"><strong>Code</strong></h2>
<details class="abstract"><summary>Check code here</summary><div class="codehilite"><pre><span></span><code><span class="cp">#include</span> <span class="cpf">&lt;ctime&gt;</span><span class="cp"></span>
<span class="cp">#include</span> <span class="cpf">&lt;cstdlib&gt;</span><span class="cp"></span>
<span class="cp">#include</span> <span class="cpf">&lt;sstream&gt;</span><span class="cp"></span>
<span class="cp">#include</span> <span class="cpf">&lt;std_msgs/Float64MultiArray.h&gt;</span><span class="cp"></span>

<span class="cp">#include</span> <span class="cpf">&quot;qt_emotion_app/qt_emotion_app.h&quot;</span><span class="cp"></span>
<span class="cp">#include</span> <span class="cpf">&quot;qt_idle_app/suspend.h&quot;</span><span class="cp"></span>

<span class="cp">#include</span> <span class="cpf">&lt;boost/thread/thread.hpp&gt;</span><span class="cp"></span>
<span class="cp">#include</span> <span class="cpf">&lt;yaml-cpp/yaml.h&gt;</span><span class="cp"></span>


<span class="cm">/**</span>
<span class="cm"> * @brief The PlayStateCB class</span>
<span class="cm"> */</span>
<span class="k">class</span> <span class="nc">PlayStateCB</span> <span class="o">:</span> <span class="k">public</span> <span class="n">rfsm</span><span class="o">::</span><span class="n">StateCallback</span> <span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
    <span class="n">PlayStateCB</span> <span class="p">(</span><span class="n">ros</span><span class="o">::</span><span class="n">NodeHandle</span><span class="o">&amp;</span> <span class="n">nh</span><span class="p">,</span> <span class="n">rfsm</span><span class="o">::</span><span class="n">StateMachine</span><span class="o">&amp;</span> <span class="n">fsm</span><span class="p">,</span> <span class="n">QTrobotServiceHelper</span><span class="o">&amp;</span> <span class="n">srvHelper</span><span class="p">)</span><span class="o">:</span>
        <span class="n">rfsm</span><span class="p">(</span><span class="n">fsm</span><span class="p">),</span> <span class="n">inState</span><span class="p">(</span><span class="nb">false</span><span class="p">),</span> <span class="n">serviceHelper</span><span class="p">(</span><span class="n">srvHelper</span><span class="p">),</span> <span class="n">with_audio_files</span><span class="p">(</span><span class="nb">false</span><span class="p">)</span> <span class="p">{</span>
        <span class="n">srand</span><span class="p">(</span><span class="n">time</span><span class="p">(</span><span class="mi">0</span><span class="p">));</span>
        <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">nh</span><span class="p">.</span><span class="n">getParam</span><span class="p">(</span><span class="s">&quot;/qt_emotion_app/with_audio_files&quot;</span><span class="p">,</span> <span class="n">with_audio_files</span><span class="p">))</span> <span class="p">{</span>
            <span class="n">ROS_WARN_STREAM</span><span class="p">(</span><span class="s">&quot;Cannot find param  /qt_emotion_app/with_audio_files.&quot;</span><span class="p">);</span>
        <span class="p">}</span>
        <span class="k">if</span><span class="p">(</span><span class="n">with_audio_files</span><span class="p">)</span> <span class="p">{</span>
            <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">nh</span><span class="p">.</span><span class="n">getParam</span><span class="p">(</span><span class="s">&quot;/qt_emotion_app/audio_path&quot;</span><span class="p">,</span> <span class="n">audio_path</span><span class="p">))</span> <span class="p">{</span>
                <span class="n">ROS_WARN_STREAM</span><span class="p">(</span><span class="s">&quot;Cannot find param  /qt_emotion_app/audio_path.&quot;</span><span class="p">);</span>
            <span class="p">}</span>
            <span class="n">ROS_INFO_STREAM</span><span class="p">(</span><span class="s">&quot;Using audios from &#39;&quot;</span><span class="o">&lt;&lt;</span><span class="n">audio_path</span><span class="o">&lt;&lt;</span><span class="s">&quot;&#39;&quot;</span><span class="p">);</span>
        <span class="p">}</span>
        <span class="k">else</span> <span class="p">{</span>
            <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">speech_message_file</span><span class="p">;</span>
            <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">nh</span><span class="p">.</span><span class="n">getParam</span><span class="p">(</span><span class="s">&quot;/qt_emotion_app/speech_message_file&quot;</span><span class="p">,</span> <span class="n">speech_message_file</span><span class="p">))</span> <span class="p">{</span>
                <span class="n">ROS_WARN_STREAM</span><span class="p">(</span><span class="s">&quot;Cannot find param  /qt_emotion_app/speech_message_file.&quot;</span><span class="p">);</span>
            <span class="p">}</span>
            <span class="n">ROS_INFO_STREAM</span><span class="p">(</span><span class="s">&quot;Loading speech messages from &#39;&quot;</span><span class="o">&lt;&lt;</span><span class="n">speech_message_file</span><span class="o">&lt;&lt;</span><span class="s">&quot;&#39;&quot;</span><span class="p">);</span>

            <span class="k">try</span><span class="p">{</span>
                <span class="n">speechMessages</span> <span class="o">=</span> <span class="n">YAML</span><span class="o">::</span><span class="n">LoadFile</span><span class="p">(</span><span class="n">speech_message_file</span><span class="p">);</span>
            <span class="p">}</span>
            <span class="k">catch</span><span class="p">(</span><span class="n">YAML</span><span class="o">::</span><span class="n">BadFile</span><span class="p">)</span> <span class="p">{</span>
                <span class="n">ROS_ERROR_STREAM</span><span class="p">(</span><span class="s">&quot;Cannot load speech file &#39;&quot;</span><span class="o">&lt;&lt;</span><span class="n">speech_message_file</span><span class="o">&lt;&lt;</span><span class="s">&quot;&#39;&quot;</span><span class="p">);</span>
                <span class="n">ros</span><span class="o">::</span><span class="n">shutdown</span><span class="p">();</span>
                <span class="k">return</span><span class="p">;</span>
            <span class="p">}</span>

            <span class="n">ROS_INFO_STREAM</span><span class="p">(</span><span class="s">&quot;Using speech in &quot;</span> <span class="o">&lt;&lt;</span> <span class="n">speechMessages</span><span class="p">[</span><span class="s">&quot;language&quot;</span><span class="p">].</span><span class="n">as</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&gt;</span><span class="p">());</span>
        <span class="p">}</span>
    <span class="p">}</span>


    <span class="k">virtual</span> <span class="kt">void</span> <span class="n">entry</span><span class="p">()</span> <span class="p">{</span>
        <span class="n">inState</span> <span class="o">=</span> <span class="nb">true</span><span class="p">;</span>                
        <span class="n">ROS_INFO</span><span class="p">(</span><span class="s">&quot;Play.entry()&quot;</span><span class="p">);</span>                

        <span class="n">ROS_INFO</span><span class="p">(</span><span class="s">&quot;Play.entry()&quot;</span><span class="p">);</span>
        <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">with_audio_files</span><span class="p">)</span> <span class="p">{</span>
            <span class="c1">// set speech language to English</span>
            <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">lang</span> <span class="o">=</span> <span class="n">speechMessages</span><span class="p">[</span><span class="s">&quot;language&quot;</span><span class="p">].</span><span class="n">as</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&gt;</span><span class="p">();</span>
            <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">serviceHelper</span><span class="p">.</span><span class="n">speechConfig</span><span class="p">(</span><span class="n">lang</span><span class="p">))</span> <span class="p">{</span>
                <span class="n">ROS_WARN_STREAM</span><span class="p">(</span><span class="s">&quot;Cannot set speech language to &quot;</span> <span class="o">&lt;&lt;</span> <span class="n">lang</span><span class="p">);</span>
            <span class="p">}</span>
        <span class="p">}</span>

        <span class="n">ROS_INFO_STREAM</span><span class="p">(</span><span class="s">&quot;emotion: &quot;</span> <span class="o">&lt;&lt;</span> <span class="n">shown_lables</span><span class="p">);</span>
        <span class="k">if</span><span class="p">(</span><span class="n">shown_lables</span> <span class="o">==</span> <span class="s">&quot;happy&quot;</span><span class="p">)</span> <span class="p">{</span>
            <span class="n">talk</span><span class="p">(</span><span class="s">&quot;emotion_recognition_001&quot;</span><span class="p">);</span>
            <span class="n">serviceHelper</span><span class="p">.</span><span class="n">showEmotionPlayGesture</span><span class="p">(</span><span class="s">&quot;QT/happy&quot;</span><span class="p">,</span> <span class="s">&quot;QT/happy&quot;</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="nb">true</span><span class="p">);</span>
        <span class="p">}</span>
        <span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="n">shown_lables</span> <span class="o">==</span> <span class="s">&quot;sad&quot;</span><span class="p">)</span> <span class="p">{</span>
            <span class="n">talk</span><span class="p">(</span><span class="s">&quot;emotion_recognition_002&quot;</span><span class="p">);</span>
            <span class="n">serviceHelper</span><span class="p">.</span><span class="n">showEmotionPlayGesture</span><span class="p">(</span><span class="s">&quot;QT/sad&quot;</span><span class="p">,</span> <span class="s">&quot;QT/sad&quot;</span><span class="p">,</span> <span class="mf">1.0</span><span class="p">,</span> <span class="nb">true</span><span class="p">);</span>
            <span class="n">talk</span><span class="p">(</span><span class="s">&quot;emotion_recognition_003&quot;</span><span class="p">);</span>
        <span class="p">}</span>
        <span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="n">shown_lables</span> <span class="o">==</span> <span class="s">&quot;angry&quot;</span><span class="p">)</span> <span class="p">{</span>
            <span class="n">talk</span><span class="p">(</span><span class="s">&quot;emotion_recognition_004&quot;</span><span class="p">);</span>
            <span class="n">serviceHelper</span><span class="p">.</span><span class="n">showEmotionPlayGesture</span><span class="p">(</span><span class="s">&quot;QT/angry&quot;</span><span class="p">,</span> <span class="s">&quot;QT/angry&quot;</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="nb">true</span><span class="p">);</span>
            <span class="n">talk</span><span class="p">(</span><span class="s">&quot;emotion_recognition_005&quot;</span><span class="p">);</span>
            <span class="n">serviceHelper</span><span class="p">.</span><span class="n">showEmotionPlayGesture</span><span class="p">(</span><span class="s">&quot;QT/breathing_exercise&quot;</span><span class="p">,</span> <span class="s">&quot;QT/breathing_exercise&quot;</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="nb">true</span><span class="p">);</span>
        <span class="p">}</span>
        <span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="n">shown_lables</span> <span class="o">==</span> <span class="s">&quot;disgusted&quot;</span><span class="p">)</span> <span class="p">{</span>
            <span class="n">talk</span><span class="p">(</span><span class="s">&quot;emotion_recognition_006&quot;</span><span class="p">);</span>
            <span class="n">serviceHelper</span><span class="p">.</span><span class="n">showEmotion</span><span class="p">(</span><span class="s">&quot;QT/disgusted&quot;</span><span class="p">);</span>
            <span class="n">talk</span><span class="p">(</span><span class="s">&quot;emotion_recognition_007&quot;</span><span class="p">);</span>
        <span class="p">}</span>
        <span class="k">else</span> <span class="k">if</span><span class="p">(</span><span class="n">shown_lables</span> <span class="o">==</span> <span class="s">&quot;surprised&quot;</span><span class="p">)</span> <span class="p">{</span>
            <span class="n">talk</span><span class="p">(</span><span class="s">&quot;emotion_recognition_008&quot;</span><span class="p">);</span>
            <span class="n">serviceHelper</span><span class="p">.</span><span class="n">showEmotionPlayGesture</span><span class="p">(</span><span class="s">&quot;QT/surprise&quot;</span><span class="p">,</span> <span class="s">&quot;QT/surprise&quot;</span><span class="p">,</span> <span class="mf">2.0</span><span class="p">,</span> <span class="nb">true</span><span class="p">);</span>
            <span class="n">talk</span><span class="p">(</span><span class="s">&quot;emotion_recognition_009&quot;</span><span class="p">);</span>
        <span class="p">}</span>
    <span class="p">}</span>

  <span class="k">virtual</span> <span class="kt">void</span> <span class="n">exit</span><span class="p">()</span> <span class="p">{</span>
        <span class="n">ROS_INFO</span><span class="p">(</span><span class="s">&quot;Play.exit()&quot;</span><span class="p">);</span>
        <span class="n">serviceHelper</span><span class="p">.</span><span class="n">homeAll</span><span class="p">();</span>
        <span class="n">ros</span><span class="o">::</span><span class="n">Duration</span><span class="p">(</span><span class="mf">1.0</span><span class="p">).</span><span class="n">sleep</span><span class="p">();</span>
        <span class="n">inState</span> <span class="o">=</span> <span class="nb">false</span><span class="p">;</span>

        <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">with_audio_files</span><span class="p">)</span> <span class="p">{</span>
            <span class="c1">// set speech language to English</span>
            <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">serviceHelper</span><span class="p">.</span><span class="n">speechConfig</span><span class="p">(</span><span class="s">&quot;default&quot;</span><span class="p">))</span> <span class="p">{</span>
                <span class="n">ROS_WARN_STREAM</span><span class="p">(</span><span class="s">&quot;Cannot set back speech language to &#39;default&#39;&quot;</span><span class="p">);</span>
            <span class="p">}</span>
        <span class="p">}</span>
    <span class="p">}</span>

    <span class="kt">void</span> <span class="n">onObjectsDetected</span><span class="p">(</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&amp;</span> <span class="n">lables</span><span class="p">)</span> <span class="p">{</span>
        <span class="n">mutexLables</span><span class="p">.</span><span class="n">lock</span><span class="p">();</span>
        <span class="n">shown_lables</span> <span class="o">=</span> <span class="n">lables</span><span class="p">;</span>
        <span class="n">mutexLables</span><span class="p">.</span><span class="n">unlock</span><span class="p">();</span>
        <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">inState</span> <span class="o">&amp;&amp;</span> <span class="n">lables</span><span class="p">.</span><span class="n">size</span><span class="p">())</span>
            <span class="n">rfsm</span><span class="p">.</span><span class="n">sendEvent</span><span class="p">(</span><span class="s">&quot;e_start_game&quot;</span><span class="p">);</span>
    <span class="p">}</span>

    <span class="kt">void</span> <span class="n">interrupt</span><span class="p">()</span> <span class="p">{</span><span class="n">interrupted</span> <span class="o">=</span> <span class="nb">true</span><span class="p">;</span> <span class="p">}</span>

    <span class="kt">bool</span> <span class="n">talk</span><span class="p">(</span><span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">message</span><span class="p">){</span>
        <span class="kt">bool</span> <span class="n">ret</span> <span class="o">=</span> <span class="nb">true</span><span class="p">;</span>
        <span class="k">if</span><span class="p">(</span><span class="n">with_audio_files</span><span class="p">)</span> <span class="p">{</span>
            <span class="n">ret</span> <span class="o">=</span> <span class="n">serviceHelper</span><span class="p">.</span><span class="n">talkAudio</span><span class="p">(</span><span class="n">message</span><span class="p">,</span> <span class="n">audio_path</span><span class="p">);</span>
            <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">ret</span><span class="p">)</span>
                <span class="n">ROS_WARN_STREAM</span><span class="p">(</span><span class="s">&quot;Could not play audio &quot;</span> <span class="o">&lt;&lt;</span> <span class="n">message</span><span class="p">);</span>
        <span class="p">}</span>
        <span class="k">else</span> <span class="p">{</span>
            <span class="k">try</span><span class="p">{</span>
                <span class="n">ROS_INFO_STREAM</span><span class="p">(</span><span class="s">&quot;talking &#39;&quot;</span> <span class="o">&lt;&lt;</span><span class="n">speechMessages</span><span class="p">[</span><span class="n">message</span><span class="p">].</span><span class="n">as</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&gt;</span><span class="p">()</span> <span class="o">&lt;&lt;</span><span class="s">&quot;&#39;&quot;</span><span class="p">);</span>
                <span class="n">ret</span> <span class="o">=</span> <span class="n">serviceHelper</span><span class="p">.</span><span class="n">talkText</span><span class="p">(</span><span class="n">speechMessages</span><span class="p">[</span><span class="n">message</span><span class="p">].</span><span class="n">as</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">string</span><span class="o">&gt;</span><span class="p">());</span>
            <span class="p">}</span> <span class="k">catch</span><span class="p">(...)</span> <span class="p">{</span>
                <span class="n">ret</span> <span class="o">=</span> <span class="nb">false</span><span class="p">;</span>
            <span class="p">}</span>
            <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">ret</span><span class="p">)</span>
                <span class="n">ROS_WARN_STREAM</span><span class="p">(</span><span class="s">&quot;Could not talk message &quot;</span> <span class="o">&lt;&lt;</span> <span class="n">message</span><span class="p">);</span>
        <span class="p">}</span>
        <span class="k">return</span> <span class="n">ret</span><span class="p">;</span>
    <span class="p">}</span>

<span class="k">private</span><span class="o">:</span>
    <span class="kt">bool</span> <span class="n">inState</span><span class="p">;</span>
    <span class="kt">bool</span> <span class="n">interrupted</span><span class="p">;</span>
    <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">shown_lables</span><span class="p">;</span>
    <span class="n">boost</span><span class="o">::</span><span class="n">mutex</span> <span class="n">mutexLables</span><span class="p">;</span>
    <span class="n">rfsm</span><span class="o">::</span><span class="n">StateMachine</span><span class="o">&amp;</span> <span class="n">rfsm</span><span class="p">;</span>
    <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">audio_path</span><span class="p">;</span>
    <span class="kt">bool</span> <span class="n">with_audio_files</span><span class="p">;</span>
    <span class="n">YAML</span><span class="o">::</span><span class="n">Node</span> <span class="n">speechMessages</span><span class="p">;</span>
    <span class="n">QTrobotServiceHelper</span><span class="o">&amp;</span> <span class="n">serviceHelper</span><span class="p">;</span>
<span class="p">};</span>


<span class="cm">/**</span>
<span class="cm"> * @brief The WaitingStateCB class</span>
<span class="cm"> */</span>
<span class="k">class</span> <span class="nc">WaitingStateCB</span> <span class="o">:</span> <span class="k">public</span> <span class="n">rfsm</span><span class="o">::</span><span class="n">StateCallback</span> <span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
    <span class="n">WaitingStateCB</span> <span class="p">(</span><span class="n">ros</span><span class="o">::</span><span class="n">NodeHandle</span><span class="o">&amp;</span> <span class="n">nh</span><span class="p">,</span> <span class="n">rfsm</span><span class="o">::</span><span class="n">StateMachine</span><span class="o">&amp;</span> <span class="n">fsm</span><span class="p">,</span> <span class="n">QTrobotServiceHelper</span><span class="o">&amp;</span> <span class="n">srvHelper</span><span class="p">)</span><span class="o">:</span>
        <span class="n">rfsm</span><span class="p">(</span><span class="n">fsm</span><span class="p">),</span> <span class="n">serviceHelper</span><span class="p">(</span><span class="n">srvHelper</span><span class="p">){</span>
        <span class="n">idleAppClient</span> <span class="o">=</span> <span class="n">nh</span><span class="p">.</span><span class="n">serviceClient</span><span class="o">&lt;</span><span class="n">qt_idle_app</span><span class="o">::</span><span class="n">suspend</span><span class="o">&gt;</span><span class="p">(</span><span class="s">&quot;/qt_idle_app/suspend&quot;</span><span class="p">);</span>
        <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">idleAppClient</span><span class="p">.</span><span class="n">exists</span><span class="p">())</span> <span class="p">{</span>
            <span class="n">ROS_WARN</span><span class="p">(</span><span class="s">&quot;Could connect to /qt_idle_app/suspend&quot;</span><span class="p">);</span>
        <span class="p">}</span>
    <span class="p">}</span>

    <span class="k">virtual</span> <span class="kt">void</span> <span class="n">entry</span><span class="p">()</span> <span class="p">{</span>
        <span class="n">ROS_INFO</span><span class="p">(</span><span class="s">&quot;Waiting.entry()&quot;</span><span class="p">);</span>
        <span class="c1">// resume qt_idle_app</span>
        <span class="n">suspendIdleApp</span><span class="p">(</span><span class="nb">false</span><span class="p">);</span>
    <span class="p">}</span>

    <span class="k">virtual</span> <span class="kt">void</span> <span class="n">exit</span><span class="p">()</span> <span class="p">{</span>
        <span class="n">ROS_INFO</span><span class="p">(</span><span class="s">&quot;Waiting.exit()&quot;</span><span class="p">);</span>
        <span class="c1">// suspend qt_idle_app</span>
        <span class="n">suspendIdleApp</span><span class="p">(</span><span class="nb">true</span><span class="p">);</span>
        <span class="c1">// home all robot</span>
        <span class="n">serviceHelper</span><span class="p">.</span><span class="n">homeAll</span><span class="p">();</span>        
    <span class="p">}</span>

<span class="k">private</span><span class="o">:</span>

    <span class="kt">bool</span> <span class="n">suspendIdleApp</span><span class="p">(</span><span class="kt">bool</span> <span class="n">flag</span><span class="p">)</span> <span class="p">{</span>
        <span class="n">qt_idle_app</span><span class="o">::</span><span class="n">suspend</span> <span class="n">cmdSuspend</span><span class="p">;</span>
        <span class="n">cmdSuspend</span><span class="p">.</span><span class="n">request</span><span class="p">.</span><span class="n">flag</span> <span class="o">=</span> <span class="n">flag</span><span class="p">;</span>
        <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">idleAppClient</span><span class="p">.</span><span class="n">call</span><span class="p">(</span><span class="n">cmdSuspend</span><span class="p">))</span> <span class="p">{</span>
            <span class="n">ROS_WARN</span><span class="p">(</span><span class="s">&quot;Could not call service qt_idle_app::suspend&quot;</span><span class="p">);</span>
            <span class="k">return</span> <span class="nb">false</span><span class="p">;</span>
        <span class="p">}</span>
        <span class="k">return</span> <span class="n">cmdSuspend</span><span class="p">.</span><span class="n">response</span><span class="p">.</span><span class="n">status</span><span class="p">;</span>
    <span class="p">}</span>


<span class="k">private</span><span class="o">:</span>
    <span class="kt">bool</span> <span class="n">inState</span><span class="p">;</span>
    <span class="n">rfsm</span><span class="o">::</span><span class="n">StateMachine</span><span class="o">&amp;</span> <span class="n">rfsm</span><span class="p">;</span>
    <span class="n">ros</span><span class="o">::</span><span class="n">ServiceClient</span> <span class="n">idleAppClient</span><span class="p">;</span>
    <span class="n">QTrobotServiceHelper</span> <span class="n">serviceHelper</span><span class="p">;</span>
<span class="p">};</span>


<span class="n">QTEmotionApp</span><span class="o">::</span><span class="n">QTEmotionApp</span><span class="p">(</span><span class="n">ros</span><span class="o">::</span><span class="n">NodeHandle</span><span class="o">&amp;</span> <span class="n">nh</span><span class="p">)</span> <span class="o">:</span> <span class="n">serviceHelper</span><span class="p">(</span><span class="n">nh</span><span class="p">)</span> <span class="p">{</span>

    <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">fsm_file</span><span class="p">;</span>
    <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">nh</span><span class="p">.</span><span class="n">getParam</span><span class="p">(</span><span class="s">&quot;/qt_emotion_app/fsm&quot;</span><span class="p">,</span> <span class="n">fsm_file</span><span class="p">))</span> <span class="p">{</span>
        <span class="n">ROS_ERROR_STREAM</span><span class="p">(</span><span class="s">&quot;Cannot find param  /qt_emotion_app/fsm&quot;</span><span class="p">);</span>
        <span class="n">ros</span><span class="o">::</span><span class="n">shutdown</span><span class="p">();</span>
    <span class="p">}</span>

    <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">rfsm</span><span class="p">.</span><span class="n">load</span><span class="p">(</span><span class="n">fsm_file</span><span class="p">))</span> <span class="p">{</span>
        <span class="n">ROS_ERROR_STREAM</span><span class="p">(</span><span class="s">&quot;Cannot load &quot;</span><span class="o">&lt;&lt;</span> <span class="n">fsm_file</span><span class="p">);</span>
        <span class="n">ros</span><span class="o">::</span><span class="n">shutdown</span><span class="p">();</span>
    <span class="p">}</span>

    <span class="c1">//serviceSuspend = nh.advertiseService(&quot;qt_emotion_app/suspend&quot;, &amp;QTEmotionApp::suspendCB, this);</span>

    <span class="n">subObjects</span> <span class="o">=</span> <span class="n">nh</span><span class="p">.</span><span class="n">subscribe</span><span class="p">(</span><span class="s">&quot;/find_object/objects&quot;</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="o">&amp;</span><span class="n">QTEmotionApp</span><span class="o">::</span><span class="n">objectsSubCB</span><span class="p">,</span> <span class="k">this</span><span class="p">);</span>


    <span class="c1">// Waiting callback</span>
    <span class="n">waitingStateCB</span> <span class="o">=</span> <span class="k">new</span> <span class="n">WaitingStateCB</span><span class="p">(</span><span class="n">nh</span><span class="p">,</span> <span class="n">rfsm</span><span class="p">,</span> <span class="n">serviceHelper</span><span class="p">);</span>
    <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">rfsm</span><span class="p">.</span><span class="n">setStateCallback</span><span class="p">(</span><span class="s">&quot;Waiting&quot;</span><span class="p">,</span> <span class="o">*</span><span class="n">waitingStateCB</span><span class="p">))</span> <span class="p">{</span>
        <span class="n">ROS_ERROR_STREAM</span><span class="p">(</span><span class="s">&quot;Cannot set callback for Waiting from &quot;</span><span class="o">&lt;&lt;</span> <span class="n">fsm_file</span><span class="p">);</span>
        <span class="n">ros</span><span class="o">::</span><span class="n">shutdown</span><span class="p">();</span>
    <span class="p">}</span>

    <span class="c1">// Play callback</span>
    <span class="n">playStateCB</span> <span class="o">=</span> <span class="k">new</span> <span class="n">PlayStateCB</span><span class="p">(</span><span class="n">nh</span><span class="p">,</span> <span class="n">rfsm</span><span class="p">,</span> <span class="n">serviceHelper</span><span class="p">);</span>
    <span class="k">if</span><span class="p">(</span><span class="o">!</span><span class="n">rfsm</span><span class="p">.</span><span class="n">setStateCallback</span><span class="p">(</span><span class="s">&quot;Game.Play&quot;</span><span class="p">,</span> <span class="o">*</span><span class="n">playStateCB</span><span class="p">))</span> <span class="p">{</span>
        <span class="n">ROS_ERROR_STREAM</span><span class="p">(</span><span class="s">&quot;Cannot set callback for Waiting from &quot;</span><span class="o">&lt;&lt;</span> <span class="n">fsm_file</span><span class="p">);</span>
        <span class="n">ros</span><span class="o">::</span><span class="n">shutdown</span><span class="p">();</span>
    <span class="p">}</span>

    <span class="n">timer</span> <span class="o">=</span> <span class="n">nh</span><span class="p">.</span><span class="n">createTimer</span><span class="p">(</span><span class="n">ros</span><span class="o">::</span><span class="n">Duration</span><span class="p">(</span><span class="mf">0.3</span><span class="p">),</span> <span class="o">&amp;</span><span class="n">QTEmotionApp</span><span class="o">::</span><span class="n">timerCallback</span><span class="p">,</span> <span class="k">this</span><span class="p">);</span>

<span class="p">}</span>

<span class="n">QTEmotionApp</span><span class="o">::~</span><span class="n">QTEmotionApp</span><span class="p">()</span> <span class="p">{</span>
    <span class="n">timer</span><span class="p">.</span><span class="n">stop</span><span class="p">();</span>
<span class="p">}</span>


<span class="kt">void</span> <span class="n">QTEmotionApp</span><span class="o">::</span><span class="n">timerCallback</span><span class="p">(</span><span class="k">const</span> <span class="n">ros</span><span class="o">::</span><span class="n">TimerEvent</span><span class="o">&amp;</span> <span class="n">event</span><span class="p">)</span> <span class="p">{</span>
    <span class="n">mutexRFSM</span><span class="p">.</span><span class="n">lock</span><span class="p">();</span>
    <span class="n">rfsm</span><span class="p">.</span><span class="n">run</span><span class="p">();</span>
    <span class="n">mutexRFSM</span><span class="p">.</span><span class="n">unlock</span><span class="p">();</span>
<span class="p">}</span>

<span class="kt">bool</span> <span class="n">QTEmotionApp</span><span class="o">::</span><span class="n">suspend</span><span class="p">(</span><span class="kt">bool</span> <span class="n">flag</span><span class="p">)</span> <span class="p">{</span>
  <span class="k">if</span><span class="p">(</span><span class="n">flag</span><span class="p">)</span> <span class="p">{</span>
      <span class="c1">//dynamic_cast&lt;LookAroundStateCB*&gt;(lookAroundStateCB)-&gt;interrupt();</span>
      <span class="k">dynamic_cast</span><span class="o">&lt;</span><span class="n">PlayStateCB</span><span class="o">*&gt;</span><span class="p">(</span><span class="n">playStateCB</span><span class="p">)</span><span class="o">-&gt;</span><span class="n">interrupt</span><span class="p">();</span>
      <span class="n">rfsm</span><span class="p">.</span><span class="n">sendEvent</span><span class="p">(</span><span class="s">&quot;e_suspend&quot;</span><span class="p">);</span>
      <span class="n">mutexRFSM</span><span class="p">.</span><span class="n">lock</span><span class="p">();</span>
      <span class="n">rfsm</span><span class="p">.</span><span class="n">run</span><span class="p">();</span> <span class="c1">// to ensure being in suspended state</span>
      <span class="n">mutexRFSM</span><span class="p">.</span><span class="n">unlock</span><span class="p">();</span>
  <span class="p">}</span>
  <span class="k">else</span> <span class="p">{</span>
      <span class="n">rfsm</span><span class="p">.</span><span class="n">sendEvent</span><span class="p">(</span><span class="s">&quot;e_resume&quot;</span><span class="p">);</span>
  <span class="p">}</span>

  <span class="k">return</span> <span class="nb">true</span><span class="p">;</span>
<span class="p">}</span>

<span class="kt">void</span> <span class="n">QTEmotionApp</span><span class="o">::</span><span class="n">objectsSubCB</span><span class="p">(</span><span class="k">const</span> <span class="n">std_msgs</span><span class="o">::</span><span class="n">Float32MultiArray</span><span class="o">::</span><span class="n">ConstPtr</span><span class="o">&amp;</span> <span class="n">objects</span><span class="p">)</span> <span class="p">{</span>
    <span class="k">if</span><span class="p">(</span><span class="n">objects</span><span class="o">-&gt;</span><span class="n">data</span><span class="p">.</span><span class="n">size</span><span class="p">()</span> <span class="o">&lt;=</span> <span class="mi">0</span> <span class="p">)</span>
        <span class="k">return</span><span class="p">;</span>

    <span class="n">std</span><span class="o">::</span><span class="n">string</span> <span class="n">lables</span><span class="p">;</span>
    <span class="k">for</span><span class="p">(</span><span class="kt">size_t</span> <span class="n">i</span><span class="o">=</span><span class="mi">0</span><span class="p">;</span> <span class="n">i</span><span class="o">&lt;</span><span class="n">objects</span><span class="o">-&gt;</span><span class="n">data</span><span class="p">.</span><span class="n">size</span><span class="p">();</span> <span class="n">i</span><span class="o">+=</span><span class="mi">12</span><span class="p">)</span> <span class="p">{</span>
        <span class="k">if</span><span class="p">(</span><span class="n">objects</span><span class="o">-&gt;</span><span class="n">data</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="mi">3</span><span class="p">)</span>
            <span class="n">lables</span> <span class="o">=</span> <span class="s">&quot;surprised&quot;</span><span class="p">;</span>
        <span class="k">else</span> <span class="nf">if</span><span class="p">(</span><span class="n">objects</span><span class="o">-&gt;</span><span class="n">data</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="mi">4</span><span class="p">)</span>
            <span class="n">lables</span> <span class="o">=</span> <span class="s">&quot;disgusted&quot;</span><span class="p">;</span>
        <span class="k">else</span> <span class="nf">if</span><span class="p">(</span><span class="n">objects</span><span class="o">-&gt;</span><span class="n">data</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="mi">5</span><span class="p">)</span>
            <span class="n">lables</span> <span class="o">=</span> <span class="s">&quot;angry&quot;</span><span class="p">;</span>
        <span class="k">else</span> <span class="nf">if</span><span class="p">(</span><span class="n">objects</span><span class="o">-&gt;</span><span class="n">data</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="mi">6</span><span class="p">)</span>
            <span class="n">lables</span> <span class="o">=</span> <span class="s">&quot;sad&quot;</span><span class="p">;</span>
        <span class="k">else</span> <span class="nf">if</span><span class="p">(</span><span class="n">objects</span><span class="o">-&gt;</span><span class="n">data</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">==</span> <span class="mi">7</span><span class="p">)</span>
            <span class="n">lables</span> <span class="o">=</span> <span class="s">&quot;happy&quot;</span><span class="p">;</span>
    <span class="p">}</span>
    <span class="c1">// call related callbacks</span>
    <span class="k">if</span><span class="p">(</span><span class="n">lables</span><span class="p">.</span><span class="n">size</span><span class="p">())</span> <span class="p">{</span>
        <span class="k">dynamic_cast</span><span class="o">&lt;</span><span class="n">PlayStateCB</span><span class="o">*&gt;</span><span class="p">(</span><span class="n">playStateCB</span><span class="p">)</span><span class="o">-&gt;</span><span class="n">onObjectsDetected</span><span class="p">(</span><span class="n">lables</span><span class="p">);</span>
    <span class="p">}</span>
<span class="p">}</span>    
</code></pre></div>

</details>
                
                  
                
                
                  
                  <hr>
                  <div class="md-source-date">
                    <small>
                      
                        Last update: February 5, 2020
                      
                    </small>
                  </div>
                
              
              
                


              
            </article>
          </div>
        </div>
      </main>
      
        <!--
  Copyright (c) 2016-2020 Martin Donath <martin.donath@squidfunk.com>

  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to
  deal in the Software without restriction, including without limitation the
  rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  sell copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:

  The above copyright notice and this permission notice shall be included in
  all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  IN THE SOFTWARE.
-->



<!-- Application footer -->
<footer id="footer" class="md-footer">

  <!-- Link to previous and/or next page -->
  

  <!-- Further information -->
  <div class="md-footer-meta md-typeset">
    <div class="md-footer-meta__inner md-grid">
      <!-- Copyright and theme information -->
      <div class="md-footer-copyright">
        
          <div class="md-footer-copyright__highlight">
            &copy; Copyright &copy; 2020 LuxAI S.A.
          </div>
        
      </div>

      <!-- Social links -->
      
  <div class="md-footer-social">
    <link rel="stylesheet" href="../../assets/fonts/font-awesome.css">
    
      <a href="https://github.com/luxai-qtrobot" target="_blank" rel="noopener" title="github" class="md-footer-social__link fa fa-github"></a>
    
      <a href="https://twitter.com/qtrobot" target="_blank" rel="noopener" title="twitter" class="md-footer-social__link fa fa-twitter"></a>
    
      <a href="https://www.linkedin.com/company/luxai/" target="_blank" rel="noopener" title="linkedin" class="md-footer-social__link fa fa-linkedin"></a>
    
      <a href="https://www.facebook.com/luxAI/" target="_blank" rel="noopener" title="facebook" class="md-footer-social__link fa fa-facebook"></a>
    
      <a href="https://www.youtube.com/channel/UCAY0H0HaqQL1GE7lO_iSpbg" target="_blank" rel="noopener" title="youtube" class="md-footer-social__link fa fa-youtube"></a>
    
  </div>

    </div>
  </div>
</footer>
      
    </div>
    
      <script src="../../assets/javascripts/application.c33a9706.js"></script>
      
      <script>app.initialize({version:"1.1",url:{base:"../.."}})</script>
      
        <script src="../../javascripts/extra.js"></script>
      
    
  </body>
</html>